package com.example.demomk.ViewModel;

import android.app.Application;

import androidx.annotation.NonNull;
import androidx.lifecycle.AndroidViewModel;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;

public class SharedViewModel extends AndroidViewModel {
    private final MutableLiveData<Void> homeButtonClicked = new MutableLiveData<>();
    private final MutableLiveData<Void> printButtonClicked = new MutableLiveData<>();

    public SharedViewModel(@NonNull Application application) {
        super(application);
    }

    public void onHomeButtonClicked() {
        homeButtonClicked.setValue(null);
    }

    public void onPrintButtonClicked() {
        printButtonClicked.setValue(null);
    }

    public LiveData<Void> getHomeButtonClicked() {
        return homeButtonClicked;
    }

    public LiveData<Void> getPrintButtonClicked() {
        return printButtonClicked;
    }
}
